package com.mdh.android.vm.util;

import com.mdh.android.vm.R;

import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

public class UniLeftUi {
    private Activity mActivity = null;

    public UniLeftUi(Activity activity){
	mActivity = activity;

	((ImageButton) mActivity.findViewById(R.id.home_btn)).setOnClickListener(new OnClickListener() {
	    @Override
	    public void onClick(View v) {
		//Intent intent = new Intent();
		//intent.setClassName("com.mdh.android.vm", "com.mdh.android.vm.SnakeActivity");
		//intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		//mActivity.startActivity(intent);
		mActivity.finish();
	    }
	});
    }
    
    public void setTitle(String title){
	TextView text;
	text = (TextView) mActivity.findViewById(R.id.title);
	text.setText(title);
    }
    
    public void setDesc(String desc){
	TextView text;
	text = (TextView) mActivity.findViewById(R.id.desc);
	text.setText(desc);
    }
}
